/**
 * 默认的 起始时间和结束时间
 */
var localsdate = myformatter();
var localedate = myformatter('e');
function myformatter(type){
	var date = new Date();
    var y = date.getFullYear();
    var m = date.getMonth()+1;
	var d = '01';
	if(type == 'e'){
		if(m == '1'||m == '3'||m == '5'||m == '7'||m == '8'||m == '10'||m == '12'){
			d = '31';
		}else if(m == '2'){
			if(!y%4 ){
				d = '29';
			}else{
				d = '28';
			}
		}else{
			d = '30';
		}
	}
    return y+'-'+(m<10?('0'+m):m)+'-'+d;
}